.class public Llt/noframe/gpsfarmguide/utils/ScreenHelper;
.super Ljava/lang/Object;
.source "ScreenHelper.java"


# instance fields
.field private kiekAtmestiPx:I

.field private kurX:I

.field private kurY:I

.field private orientation:I

.field ribos:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Landroid/graphics/Point;",
            ">;"
        }
    .end annotation
.end field

.field private x:I

.field private xdpi:I

.field private y:I

.field private ydpi:I

.field private ydpi2:I


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    .line 71
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 44
    iput v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->xdpi:I

    .line 45
    iput v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ydpi:I

    .line 46
    iput v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ydpi2:I

    .line 72
    invoke-virtual {p0, p1}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->imgDydis(Landroid/content/Context;)V

    .line 73
    invoke-virtual {p0, p1}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->reject(Landroid/content/Context;)V

    return-void
.end method

.method public static dpToPx(DLandroid/content/Context;)I
    .locals 0

    .line 252
    invoke-virtual {p2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p2

    double-to-int p0, p0

    int-to-float p0, p0

    .line 253
    invoke-virtual {p2}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object p1

    const/4 p2, 0x1

    invoke-static {p2, p0, p1}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result p0

    float-to-int p0, p0

    return p0
.end method

.method private static getDisplay(Landroid/content/Context;)Landroid/view/Display;
    .locals 1

    const-string v0, "window"

    .line 259
    invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Landroid/view/WindowManager;

    .line 260
    invoke-interface {p0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object p0

    return-object p0
.end method

.method public static getScreenHeight(Landroid/content/Context;)I
    .locals 2

    .line 283
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0xd

    if-lt v0, v1, :cond_0

    .line 284
    new-instance v0, Landroid/graphics/Point;

    invoke-direct {v0}, Landroid/graphics/Point;-><init>()V

    .line 285
    invoke-static {p0}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->getDisplay(Landroid/content/Context;)Landroid/view/Display;

    move-result-object p0

    invoke-virtual {p0, v0}, Landroid/view/Display;->getSize(Landroid/graphics/Point;)V

    .line 286
    iget p0, v0, Landroid/graphics/Point;->y:I

    goto :goto_0

    .line 288
    :cond_0
    invoke-static {p0}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->getDisplay(Landroid/content/Context;)Landroid/view/Display;

    move-result-object p0

    .line 289
    invoke-virtual {p0}, Landroid/view/Display;->getHeight()I

    move-result p0

    :goto_0
    return p0
.end method

.method public static getScreenOrientation(Landroid/content/Context;)I
    .locals 0

    .line 340
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p0

    invoke-virtual {p0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object p0

    iget p0, p0, Landroid/content/res/Configuration;->orientation:I

    return p0
.end method

.method public static getStatusBarHeight(Landroid/content/Context;)I
    .locals 2

    .line 306
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object p0

    const-string v0, "status_bar_height"

    const/4 v1, 0x0

    .line 307
    invoke-interface {p0, v0, v1}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result p0

    return p0
.end method

.method public static getViewHeight(Landroid/view/View;)I
    .locals 1

    const/4 v0, 0x0

    .line 301
    invoke-virtual {p0, v0, v0}, Landroid/view/View;->measure(II)V

    .line 302
    invoke-virtual {p0}, Landroid/view/View;->getMeasuredHeight()I

    move-result p0

    return p0
.end method

.method public static keepScreenOn(Landroid/content/Context;Z)V
    .locals 1

    const/16 v0, 0x80

    if-eqz p1, :cond_0

    .line 332
    check-cast p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object p0

    invoke-virtual {p0, v0}, Landroid/view/Window;->addFlags(I)V

    goto :goto_0

    .line 334
    :cond_0
    check-cast p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object p0

    invoke-virtual {p0, v0}, Landroid/view/Window;->clearFlags(I)V

    :goto_0
    return-void
.end method

.method public static setTopMargins(Landroid/content/Context;Landroid/widget/ImageButton;IZ)V
    .locals 0

    if-eqz p3, :cond_0

    .line 345
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p3

    invoke-virtual {p3, p0}, Llt/noframe/gpsfarmguide/Data;->getToolbarheight(Landroid/content/Context;)I

    move-result p0

    goto :goto_0

    :cond_0
    const/4 p0, 0x0

    .line 346
    :goto_0
    invoke-virtual {p1}, Landroid/widget/ImageButton;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object p3

    check-cast p3, Landroid/view/ViewGroup$MarginLayoutParams;

    add-int/2addr p0, p2

    .line 348
    iput p0, p3, Landroid/view/ViewGroup$MarginLayoutParams;->topMargin:I

    .line 349
    invoke-virtual {p1, p3}, Landroid/widget/ImageButton;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    return-void
.end method


# virtual methods
.method public getKiekAtmestiPx()I
    .locals 1

    .line 68
    iget v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->kiekAtmestiPx:I

    return v0
.end method

.method public getKurX()I
    .locals 1

    .line 49
    iget v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->kurX:I

    return v0
.end method

.method public getKurY()I
    .locals 1

    .line 52
    iget v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->kurY:I

    return v0
.end method

.method public getXdpi()I
    .locals 1

    .line 55
    iget v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->xdpi:I

    return v0
.end method

.method public getYdpi()I
    .locals 1

    .line 58
    iget v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ydpi:I

    return v0
.end method

.method public getYdpi2()I
    .locals 1

    .line 61
    iget v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ydpi2:I

    return v0
.end method

.method public imgDydis(Landroid/content/Context;)V
    .locals 3

    .line 110
    new-instance v0, Landroid/util/DisplayMetrics;

    invoke-direct {v0}, Landroid/util/DisplayMetrics;-><init>()V

    const-string v1, "window"

    .line 111
    invoke-virtual {p1, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/view/WindowManager;

    .line 112
    invoke-interface {v1}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V

    .line 113
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p1

    const v1, 0x7f080126

    invoke-static {p1, v1}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object p1

    .line 114
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0xb

    if-lt v1, v2, :cond_0

    .line 116
    :try_start_0
    invoke-virtual {p1, v0}, Landroid/graphics/Bitmap;->getScaledWidth(Landroid/util/DisplayMetrics;)I

    move-result v1

    iput v1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->xdpi:I

    .line 117
    invoke-virtual {p1, v0}, Landroid/graphics/Bitmap;->getScaledHeight(Landroid/util/DisplayMetrics;)I

    move-result v1

    mul-int/lit8 v1, v1, 0x2

    iput v1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ydpi:I

    .line 118
    invoke-virtual {p1, v0}, Landroid/graphics/Bitmap;->getScaledHeight(Landroid/util/DisplayMetrics;)I

    move-result p1

    iput p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ydpi2:I
    :try_end_0
    .catch Ljava/lang/NoSuchMethodError; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 124
    :cond_0
    invoke-virtual {p1, v0}, Landroid/graphics/Bitmap;->getScaledWidth(Landroid/util/DisplayMetrics;)I

    move-result v1

    iput v1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->xdpi:I

    .line 125
    invoke-virtual {p1, v0}, Landroid/graphics/Bitmap;->getScaledHeight(Landroid/util/DisplayMetrics;)I

    move-result p1

    iput p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ydpi:I

    const/4 p1, 0x0

    .line 126
    iput p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ydpi2:I

    :catch_0
    :goto_0
    return-void
.end method

.method public reject(Landroid/content/Context;)V
    .locals 5
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "NewApi"
        }
    .end annotation

    .line 80
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    iget v0, v0, Landroid/content/res/Configuration;->orientation:I

    iput v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->orientation:I

    const-string v0, "window"

    .line 81
    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/WindowManager;

    .line 82
    invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v0

    .line 83
    new-instance v1, Landroid/graphics/Point;

    invoke-direct {v1}, Landroid/graphics/Point;-><init>()V

    .line 86
    :try_start_0
    invoke-virtual {v0, v1}, Landroid/view/Display;->getSize(Landroid/graphics/Point;)V

    .line 87
    iget v2, v1, Landroid/graphics/Point;->x:I

    iput v2, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->x:I

    .line 88
    iget v1, v1, Landroid/graphics/Point;->y:I

    iput v1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->y:I
    :try_end_0
    .catch Ljava/lang/NoSuchMethodError; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 90
    :catch_0
    invoke-virtual {v0}, Landroid/view/Display;->getWidth()I

    move-result v1

    iput v1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->x:I

    .line 91
    invoke-virtual {v0}, Landroid/view/Display;->getHeight()I

    move-result v0

    iput v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->y:I

    .line 96
    :goto_0
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const-string v1, "status_bar_height"

    const-string v2, "dimen"

    const-string v3, "android"

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    const/4 v1, 0x0

    if-lez v0, :cond_0

    .line 98
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    goto :goto_1

    :cond_0
    const/4 v0, 0x0

    .line 100
    :goto_1
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const/4 v3, 0x1

    const/high16 v4, 0x42480000    # 50.0f

    .line 101
    invoke-virtual {v2}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v2

    invoke-static {v3, v4, v2}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v2

    float-to-int v2, v2

    add-int/2addr v0, v2

    iput v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->kiekAtmestiPx:I

    const-string v0, "settings"

    .line 102
    invoke-virtual {p1, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object p1

    invoke-interface {p1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object p1

    iget v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->kiekAtmestiPx:I

    const-string v1, "px_to_reject"

    invoke-interface {p1, v1, v0}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object p1

    invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V

    return-void
.end method

.method public slinkimasSonan(Landroid/content/Context;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/GoogleMap;)Z
    .locals 12

    .line 162
    invoke-virtual {p3}, Lcom/google/android/gms/maps/GoogleMap;->getProjection()Lcom/google/android/gms/maps/Projection;

    move-result-object p3

    invoke-virtual {p3, p2}, Lcom/google/android/gms/maps/Projection;->toScreenLocation(Lcom/google/android/gms/maps/model/LatLng;)Landroid/graphics/Point;

    move-result-object p2

    .line 163
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p3

    invoke-virtual {p3}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object p3

    iget p3, p3, Landroid/content/res/Configuration;->orientation:I

    iget v0, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->orientation:I

    if-eq p3, v0, :cond_0

    invoke-virtual {p0, p1}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->reject(Landroid/content/Context;)V

    .line 164
    :cond_0
    iget p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->y:I

    iget p3, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->x:I

    const-wide v0, 0x3fc3333333333333L    # 0.15

    const-wide v2, 0x3fd3333333333333L    # 0.3

    if-le p1, p3, :cond_1

    int-to-double v4, p3

    int-to-double v6, p3

    const-wide v8, 0x3fbeb851eb851eb8L    # 0.12

    .line 165
    invoke-static {v6, v7}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v6, v6, v8

    invoke-static {v4, v5}, Ljava/lang/Double;->isNaN(D)Z

    sub-double/2addr v4, v6

    int-to-double v6, p3

    .line 166
    invoke-static {v6, v7}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v6, v6, v8

    int-to-double v8, p1

    int-to-double v10, p1

    .line 167
    invoke-static {v10, v11}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v10, v10, v2

    invoke-static {v8, v9}, Ljava/lang/Double;->isNaN(D)Z

    sub-double/2addr v8, v10

    int-to-double v2, p1

    .line 168
    invoke-static {v2, v3}, Ljava/lang/Double;->isNaN(D)Z

    goto :goto_0

    :cond_1
    int-to-double v4, p3

    int-to-double v6, p3

    const-wide v8, 0x3fb47ae147ae147bL    # 0.08

    .line 171
    invoke-static {v6, v7}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v6, v6, v8

    invoke-static {v4, v5}, Ljava/lang/Double;->isNaN(D)Z

    sub-double/2addr v4, v6

    int-to-double v6, p3

    .line 172
    invoke-static {v6, v7}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v6, v6, v8

    int-to-double v8, p1

    int-to-double v10, p1

    .line 173
    invoke-static {v10, v11}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v10, v10, v2

    invoke-static {v8, v9}, Ljava/lang/Double;->isNaN(D)Z

    sub-double/2addr v8, v10

    int-to-double v2, p1

    .line 174
    invoke-static {v2, v3}, Ljava/lang/Double;->isNaN(D)Z

    :goto_0
    mul-double v2, v2, v0

    .line 197
    iget p1, p2, Landroid/graphics/Point;->y:I

    int-to-double v0, p1

    const/4 p3, 0x0

    const-string v10, "SLINKIMAS"

    cmpg-double v11, v0, v2

    if-gez v11, :cond_2

    double-to-int v0, v2

    sub-int/2addr v0, p1

    neg-int p1, v0

    .line 199
    iput p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->kurY:I

    const-string p1, "UP"

    .line 200
    invoke-static {v10, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_1

    :cond_2
    int-to-double v0, p1

    cmpl-double v11, v0, v8

    if-lez v11, :cond_3

    double-to-int v0, v8

    sub-int/2addr v0, p1

    neg-int p1, v0

    .line 202
    iput p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->kurY:I

    const-string p1, "DOWN"

    .line 203
    invoke-static {v10, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_1

    .line 205
    :cond_3
    iput p3, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->kurY:I

    .line 209
    :goto_1
    iget p1, p2, Landroid/graphics/Point;->x:I

    int-to-double v0, p1

    cmpg-double v11, v0, v6

    if-gez v11, :cond_4

    double-to-int v0, v6

    sub-int/2addr v0, p1

    neg-int p1, v0

    .line 211
    iput p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->kurX:I

    const-string p1, "LEFT"

    .line 212
    invoke-static {v10, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_2

    :cond_4
    int-to-double v0, p1

    cmpl-double v11, v0, v4

    if-lez v11, :cond_5

    double-to-int v0, v4

    sub-int/2addr v0, p1

    neg-int p1, v0

    .line 215
    iput p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->kurX:I

    const-string p1, "RIGHT"

    .line 216
    invoke-static {v10, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_2

    .line 218
    :cond_5
    iput p3, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->kurX:I

    .line 222
    :goto_2
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ribos:Ljava/util/List;

    .line 223
    iget-object p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ribos:Ljava/util/List;

    new-instance v0, Landroid/graphics/Point;

    double-to-int v1, v4

    double-to-int v10, v8

    invoke-direct {v0, v1, v10}, Landroid/graphics/Point;-><init>(II)V

    invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 224
    iget-object p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ribos:Ljava/util/List;

    new-instance v0, Landroid/graphics/Point;

    double-to-int v11, v2

    invoke-direct {v0, v1, v11}, Landroid/graphics/Point;-><init>(II)V

    invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 225
    iget-object p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ribos:Ljava/util/List;

    new-instance v0, Landroid/graphics/Point;

    double-to-int v1, v6

    invoke-direct {v0, v1, v10}, Landroid/graphics/Point;-><init>(II)V

    invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 226
    iget-object p1, p0, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->ribos:Ljava/util/List;

    new-instance v0, Landroid/graphics/Point;

    invoke-direct {v0, v1, v11}, Landroid/graphics/Point;-><init>(II)V

    invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 229
    iget p1, p2, Landroid/graphics/Point;->y:I

    int-to-double v0, p1

    cmpl-double v10, v0, v2

    if-lez v10, :cond_6

    int-to-double v0, p1

    cmpg-double p1, v0, v8

    if-gez p1, :cond_6

    iget p1, p2, Landroid/graphics/Point;->x:I

    int-to-double v0, p1

    cmpl-double p2, v0, v6

    if-lez p2, :cond_6

    int-to-double p1, p1

    cmpg-double v0, p1, v4

    if-gez v0, :cond_6

    const/4 p1, 0x1

    return p1

    :cond_6
    return p3
.end method
